import 'package:flutter/material.dart';
import 'package:flutter_test1/widgets/app_bar/app_bar.dart';

class AppBarWrapper extends StatelessWidget implements PreferredSizeWidget {
  final String title;
  final Color? bgColor;
  final Widget? leading;
  final TextStyle? style;
  final dynamic action;

  const AppBarWrapper({
    super.key,
    required this.title,
    this.bgColor,
    this.leading,
    this.style,
    this.action,
  });

  @override
  Widget build(BuildContext context) {
    return xAppBar(
      context,
      title,
      bgColor: bgColor,
      leading: leading,
      action: action,
      style: style,
    );
  }

  @override
  Size get preferredSize => const Size.fromHeight(kToolbarHeight);
}
